/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.cvut.fel.taskpro.data.imanager;

import cz.cvut.fel.taskpro.data.entity.SystemEnviroment;
import java.util.List;
import javax.ejb.Local;

/**
 * This interface specify database responsible action of data manager, which is
 * responsible for working with system enviroment.
 *
 * @author Tom
 */
@Local
public interface IEnviromentData {

    /**
     * This method get all system enviroment from database.
     *
     * @return list of all system enviroment from database, order by key
     * ascendant
     */
    public List<SystemEnviroment> getAllEnviroments();

    /**
     * This method add system enviroment to DB.
     *
     * @param newEnviroment system enviroment to add to DB
     */
    public void addSystemEnviroment(SystemEnviroment newEnviroment);

    /**
     * This method find in database enviroment by specific key. If no result is
     * found then return empty list.
     *
     * @param key key of enviroment to find
     * @return all enviroment by specific key If no result is found then return
     * empty list. Order by key acendant.
     */
    public List<SystemEnviroment> getEnviroment(String key);

    /**
     * This method update system enviroment in parameter.
     *
     * @param enviromentToUpdate enviroment to update to DB
     */
    public void update(SystemEnviroment enviromentToUpdate);

    /**
     * This method remove system enviroment from database.
     *
     * @param enviromentToRemove enviroment to remove from DB
     */
    public void remove(SystemEnviroment enviromentToRemove);
}
